<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/common.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<meta charset="utf-8">
<head></head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								单位名称：
								<input type="text" name="txCompany" />
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()">
									<i class="fa fa-search"></i>
									&nbsp;搜索
								</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()">
									<i class="fa fa-refresh"></i>
									&nbsp;重置
								</a>
							</li>
						</ul>
					</div>
				</form>
			</div>

			<div class="btn-group-sm hidden-xs" id="toolbar" role="group">

				<!-- 	<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:taxRegistration:edit">
					<i class="fa fa-edit"></i>
					修改
				</a> -->
				<!-- 	<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:taxRegistration:remove">
					<i class="fa fa-remove"></i>
					删除 -->
				</a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	<script>
		var prefix = "${ctx}/system/registration";
		var type = '${type}';
		$(function() {
			var options = {
				url : prefix + "/list?status=0",
				createUrl : prefix + "/infoList",
				updateUrl : prefix + "/edit/{id}",
				removeUrl : prefix + "/remove",
				modalName : "税务登记",
				search : false,
				showExport : false,
				showColumns : false,
				showToggle : false,
				columns : [ {
					checkbox : true
				},
					{
						field : 'txId',
						title : '编号',
						visible : false
					},
					{
						field : 'txCompany',
						title : '单位名称',
					},
					{
						field : 'txCompanyAddress',
						title : '经营地点',
					},
					{
						field : 'txOwner',
						title : '纳税人',
					},
					{
						field : 'txOwnerIdCardType',
						title : '证件类型',
						formatter : function(value, row, index) {
							if (row.txOwnerIdCardType == 1) {
								return "身份证";
							} else if (row.txOwnerIdCardType == 2) {
								return "港澳台通行证";
							} else if (row.txOwnerIdCardType == 3) {
								return "结婚证";
							} else if (row.txOwnerIdCardType == 4) {
								return "驾驶证";
							} else {
								return "其他";
							}
						}
					},
					{
						field : 'txOwnerIdCardNum',
						title : '证件号码',
					},
					{
						field : 'txType',
						title : '登记类型',
						formatter : function(value, row, index) {
							if (row.txType == 1) {
								return "开业税务登记";
							} else if (row.txType == 2) {
								return "变更税务登记";
							} else if (row.txType == 3) {
								return "停业复业税务登记";
							} else if (row.txType == 4) {
								return "外出经营报登记";
							} else {
								return "注销税务登记";
							}
						}
					},
					{
						field : 'txModel',
						title : '生产经营方式',
						formatter : function(value, row, index) {
							if (row.txModel == 1) {
								return "个人独立经营方式";
							} else if (row.txModel == 2) {
								return "合伙经营方式";
							} else if (row.txModel == 3) {
								return "有限责任公司";
							} else {
								return "";
							}
						}
					},
					{
						field : 'txRegisteredCapital',
						title : '注册资金',
					},
					{
						field : 'txTotalInvestment',
						title : '投资总额',
					},
					{
						field : 'txEndTime',
						title : '生产经营期限',
					},
					{
						field : 'txFinancialManager',
						title : '财务负责人',
					},
					{
						field : 'txPhone',
						title : '联系电话',
					},
					{
						field : 'status',
						title : '状态',
						formatter : function(value, row, index) {
							if (row.status == 1) {
								return "已创建";
							} else if (row.status == 2) {
								return "开业登记审核中";
							} else if (row.status == 3) {
								return "开业登记不通过";
							} else if (row.status == 4) {
								return "正常";
							} else if (row.status == 5) {
								return "变更登记审核中";
							} else if (row.status == 6) {
								return "变更登记不通过";
							} else if (row.status == 7) {
								return "变更登记通过";
							} else if (row.status == 8) {
								return "注销登记审核中";
							} else if (row.status == 0) {
								return "已注销登记";
							}
						}
					}
				]
			};
			$.table.init(options);
		});
	</script>
</body>
</html>